<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false"%>
<%@ page import="com.spoto.oa.model.*"%>
<%@ page import="java.util.*;"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>修改公告</title>
		<link href="style/v1/common/form.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/lib/jquery-1.4.2.js">
</script>
		<script type="text/javascript" src="js/ckeditor/ckeditor.js">
</script>
<script type="text/javascript" src="js/notice/update_notice.js">

</script>
	</head>
	<body>
		<h1>
			修改公告
		</h1>
		
						
		<form action="NoticeServlet?op_type=update" class="form" method="post">
			<ul>
				<li>
				<%
					Notice notice=(Notice)request.getAttribute("notice");
					
				 %>
					标题:
					<input type="text" name="title" value="<%=notice.getTitle() %>">
					公告类型:
					<input type="hidden" name="type" value="<%=notice.getType() %>" id="type"/>
					<input type="hidden" name="id" value="<%=notice.getId() %>"/>
					<input type="hidden" name="creator" value="<%=notice.getCreator() %>"/>
					<select name="type_select">
						<%
							List<NoticeType> noticeTypes = (List<NoticeType>) request
									.getAttribute("noticeTypes");
							Iterator<NoticeType> i = noticeTypes.iterator();
							while (i.hasNext()) {
								NoticeType noticeType = i.next();
						%>
						<option name="type">
						<%=noticeType.getName() %>
						</option>
						<%
							}
						%>
					</select>
				</li>
				<li>

					公告内容:
					<br>
					<textarea name="content" rows="3" cols="10" id="content"><%=notice.getContent() %></textarea>
				</li>
			</ul>
			<ul>
				<li>
					<input type="submit" name="submit" value="修改" />
				</li>
			</ul>
		</form>
	</body>
</html>